// 库存管理接口
import request from "@/common/request.js";
const api = {
  production_flaw: "/production_flaw/",
  warehouse: "/warehouse/",
  production_order: "/production_order/",
  production_order_product: "/production_order_product/",
  production_in_product: "/production_in_product/",
  production_flaw_product: "/production_flaw_product/",
};
const pBadnessApi = {
  get_production_flaw(params) {
    return request({
      url: api.production_flaw,
      method: "get",
      params,
    });
  },

  get_production_order(params) {
    return request({
      url: api.production_order,
      method: "get",
      params,
    });
  },

  production_order_product_detail(params) {
    return request({
      url: api.production_order_product,
      method: "get",
      params,
    });
  },

  get_warehouse(params) {
    return request({
      url: api.warehouse,
      method: "get",
      params,
    });
  },

  production_flaw_detail(id) {
    return request({
      url: api.production_flaw + id,
      method: "get",
    });
  },

  production_flaw_product(params) {
    return request({
      url: api.production_flaw_product,
      method: "get",
      params,
    });
  },
  post_production_flaw(data) {
    return request({
      url: api.production_flaw,
      method: "post",
      data,
    });
  },

  patch_production_flaw(data, id) {
    return request({
      url: api.production_flaw + id + "/",
      method: "patch",
      data,
    });
  },

  delete_production_flaw(id) {
    return request({
      url: api.production_flaw + id + "/",
      method: "delete",
    });
  },
};
export default pBadnessApi